/**
 * 玩家好友事件處理
 */
function friendsEvent() 
{
	
}
	
/**
 * 获取好友数据
 */
friendsEvent.prototype.getFriends = function(r_user) 
{
	if (!r_user) return ;
	var _friends = __userVars.getVar(r_user, "friends", 'str');		
	if (_friends) {
		var _arr = [];
		var _tmp = _friends.split(",");
		var _zone = _server.getCurrentZone();
		var _user;
		for each(var id in _tmp )
		{
			if (id == "") continue;
			_user = _zone.getUserByName(id);
			if (_user) {
				_arr.push(__userVars.getUserVars(_user));
			}
		}
		var _param = { };
		_param._cmd = "friends";
		_param.dataObj = _arr;
		_server.sendResponse(_param, -1, null,[r_user], 'json');	
	}
}
